Consistent replication of transactional updates

ABSTRACT

Embodiments of the present invention provide a method, system and computer program product for consistent replication of transactional updates. In an embodiment of the invention, a method for consistent replication of data in a transaction processing system is provided. The method includes recording entries in a replication log of different data updates and corresponding transactions and additionally recording entries in the replication log indicating whether or not the transactions have been backed out. The method also includes replicating only those data updates referenced in the log which do not correspond to transactions indicated in the log to have been backed out. For instance the additionally recorded entries in the replication log indicate when a transaction has been backed out. Alternatively, the additionally recorded entries in the replication log indicate when a transaction has been committed.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to atomic transactional updates in atransaction processing system and more particularly to replication oftransactionally updated data in a transaction processing system.

2. Description of the Related Art

A transaction processing system is a type of information system thatcollects, stores, modifies, and retrieves organizational transactions.In this regard, a transaction is an event that generates or modifiesdata that is eventually stored in an information system. To beconsidered a transaction processing system the “ACID” test must besatisfied. In this regard, the “ACID” test refers to a test foratomicity, consistency, isolation, durability as a set of propertiesthat guarantee database transactions are processed reliably.

The essence of a transaction processing system is that the data of thetransaction processing system data must be left in a consistent state.That is to say, for a compound transaction, for the transaction tocomplete successfully, all portions of the transaction must completesuccessfully. Otherwise, any changes resulting from the partialcompletion of the transaction must be “rolled back” to the state thatexisted prior to the initiation of the compound transaction. While thistype of integrity must be provided also for batch transactionprocessing, it is particularly important for real time processing. Othertransaction monitor functions include deadlock detection and resolutionresulting from cross-dependence on data, and transaction logging intrace logs for forward recovery in case of transaction failuresrequiring debugging.

Transaction processing is not limited to a centralized computingarchitecture. Rather, as a matter of best practices, transactionprocessing has been deployed within a distributed computingarchitecture. Within a distributed computing architecture, differentservers, whether virtual or real, replicate data between one another sothat each server maintains an identical set of working data therebypermitting the manipulation of the data in any selected server.Consequently, redundancy can be achieved for the purpose of highavailability or disaster recovery, without requiring an end user toremain captive to any particular one of the servers. Yet, whileadvantageous, replicating data in a transaction processing system is notwithout its perils.

In this regard, when performing replication in a transaction processingsystem, only updates to records that are not to be rolled back and arecommitted should be replicated to a different server so that the data inthe different server is not exposed to data inconsistency in the eventthat the data is rolled back in the origin server. To combat thispotential inconsistency, log files are typically employed such that thedifferent server can inspect the log file to determine whether or notreplicated data need also be rolled back as it had been on a sourceserver. However, where multiple log files are employed, coordinating acommon understanding of updates and roll backs to ensure consistency inreplication can be challenging.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention address deficiencies of the art inrespect to transactional update replication and provide a novel andnon-obvious method, system and computer program product for consistentreplication of transactional updates. In an embodiment of the invention,a method for consistent replication of data in a transaction processingsystem is provided. The method includes recording entries in areplication log of different data updates and corresponding transactionsand additionally recording entries in the replication log indicatingwhether or not the transactions have been backed out. The method alsoincludes replicating only those data updates referenced in the log whichdo not correspond to transactions indicated in the log to have beenbacked out. For instance the additionally recorded entries in thereplication log indicate when a transaction has been backed out.Alternatively, the additionally recorded entries in the replication logindicate when a transaction has been committed.

In another embodiment of the invention, a transaction processing systemcan be configured for consistent replication of data. The system caninclude a host server computer coupled to different remote servers overa computer communications network and a data store of data coupled tothe host server and a different data store of data coupled to one of theremote servers. The system also can include a transaction processingsystem executing in memory of the host server computer and generatingdata updates in the data store coupled to the host server computer. Thesystem yet further can include a replicator executing in memory of thehost server computer replicating data updates from the data storecoupled to the host server computer to the data store coupled to the oneof the remote servers.

Finally, the system can include a consistent replication moduleexecuting in the memory of the host server computer. The module caninclude program code enabled to record entries in a replication log ofdifferent data updates and corresponding transactions performed by thetransaction processing system, to additionally record entries in thereplication log indicating whether or not the transactions have beenbacked out, and to direct the replicator to replicate only those dataupdates referenced in the log which do not correspond to transactionsindicated in the log to have been backed out.

Additional aspects of the invention will be set forth in part in thedescription which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. The aspectsof the invention will be realized and attained by means of the elementsand combinations particularly pointed out in the appended claims. It isto be understood that both the foregoing general description and thefollowing detailed description are exemplary and explanatory only andare not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute partof this specification, illustrate embodiments of the invention andtogether with the description, serve to explain the principles of theinvention. The embodiments illustrated herein are presently preferred,it being understood, however, that the invention is not limited to theprecise arrangements and instrumentalities shown, wherein:

FIG. 1 is a pictorial illustration of a process for consistentreplication of data in a transaction processing system;

FIG. 2 is a schematic illustration of a transaction processing systemconfigured for consistent replication of data; and,

FIG. 3 is a flow chart illustrating a process for consistent replicationof data in a transaction processing system.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the invention provide for the consistent replication ofdata in a transaction processing system. In accordance with anembodiment of the invention, transaction log of updates can beestablished and log entries for data updates in a transaction writtenthereto. Additional entries can be written to the log for correspondingtransactions for which related data updates may be replicated.Thereafter, during replication the log can be inspected by a remoteserver and only those data updates associated with a correspondingtransaction with an entry in the log permitting replication arereplicated to the remote server.

In further illustration, FIG. 1 pictorial shows a process for consistentreplication of data in a transaction processing system. As shown in FIG.1, replication logic 140 can direct replication of data from a sourceserver 110 to a remote server 120 over a computer communications network130. Replication logic 140 additionally can maintain one or morereplication logs 150 into which data updates 160 applied in the sourceserver 110 can be recorded. The entries in the replication logs 150additionally can relate each of the data updates 160 to a correspondingtransaction identifier 170 so that a set of the data updates 160 can becorrelated to a corresponding, single transaction.

Of note, whenever a transaction is backed out, a back out record 190 canbe written to the replication log 150. (Alternatively, whenever atransaction is committed, a back out record 190 acting as a “commitrecord” can be written to the replication log 150 indicating that thetransaction has not been backed out) The back out record 190 can beassociated in the back out record 190 to a corresponding transactionidentifier. Additionally, data updates resulting from the backing out ofa corresponding transaction can be omitted from reference in thereplication log 150. In this way, as the remote server 120 replicatesdata updates 160 referenced in the replication log 150, data updates 160which are associated with a transaction that has been backed out can beexcluded from replication and only those of the data updates referencedin the replication log 150 which are associated with a committedtransaction can be replicated from the source server 110 to the remoteserver 120.

The process described in connection with FIG. 1 can be implementedwithin a transaction processing system. In yet further illustration,FIG. 2 schematically shows a transaction processing system configuredfor consistent replication of data. The system can include a host servercomputer 210 with at least one processor and memory configured forcommunicative coupling to other servers 230 over computer communicationsnetwork 220. Each of the host server computer 210 and the other servers230 can include a corresponding data store 260, 240 (only a single datastore 240 shown in connection with the other server 230 for the purposeof illustrative simplicity). The host server computer 210 can supportthe execution of a transaction processing system 270. A replicator 290additionally can be provided. The replicator 290 can be configured toreplicate data between the data stores 240, 260 that has been producedin consequence of different transactions in the transaction processingsystem 270.

Of note, a consistent replication module 300 can be coupled to thereplicator 290 and the transaction processing system 270. The consistentreplication module 300 can include program code that when executed inthe memory of the host server computer 210, can be enabled to createentries in a replication log 250 indicating not only data updates in thetransaction processing system in connection with different transactions,but also the replication log 250 can indicate when certain transactionshave been either committed or backed out. The program code of theconsistent replication module 300 additionally can be enabled to directreplication of data updates between the data stores 240, 260 only whenthose data updates are not part of a transaction that has been backedout as indicated by the replication log 250.

In even yet further illustration of the operation of the consistentreplication module, FIG. 3 is a flow chart illustrating a process forconsistent replication of data in a transaction processing system.Beginning in block 310, a replication request can be received inconnection with a data store. In block 320, a transaction log fortransactions in the transaction processing system can be loaded forinspection and in block 330, a first set of data updates for acorresponding transaction can be determined in block 340. In block 350,the log can be searched for a backout record of the correspondingtransaction. In decision block 360, if a backout record can be foundindicating that the transaction has been backed out, the correspondingdata updates for the backed out transaction can be omitted fromreplication. Otherwise, in block 370 the corresponding data updates canbe replicated to the remote server. In decision block 380, if additionaldata updates remain to be processed in the replication log, the processcan return to block 390 with the retrieval of a next set of dataupdates. Otherwise, the process can end in block 400.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radiofrequency, and the like, or anysuitable combination of the foregoing. Computer program code forcarrying out operations for aspects of the present invention may bewritten in any combination of one or more programming languages,including an object oriented programming language and conventionalprocedural programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention have been described above withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the invention. In this regard, the flowchart and blockdiagrams in the Figures illustrate the architecture, functionality, andoperation of possible implementations of systems, methods and computerprogram products according to various embodiments of the presentinvention. For instance, each block in the flowchart or block diagramsmay represent a module, segment, or portion of code, which comprises oneor more executable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

It also will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks. The computer program instructions may also beloaded onto a computer, other programmable data processing apparatus, orother devices to cause a series of operational steps to be performed onthe computer, other programmable apparatus or other devices to produce acomputer implemented process such that the instructions which execute onthe computer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

Finally, the terminology used herein is for the purpose of describingparticular embodiments only and is not intended to be limiting of theinvention. As used herein, the singular forms “a”, “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. It will be further understood that the terms“comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

Having thus described the invention of the present application in detailand by reference to embodiments thereof, it will be apparent thatmodifications and variations are possible without departing from thescope of the invention defined in the appended claims as follows:

1. A method for consistent replication of data in a transactionprocessing system, the method comprising: recording entries in areplication log of different data updates and correspondingtransactions; additionally recording entries in the replication logindicating whether or not the transactions have been backed out; and,replicating only those data updates referenced in the log which do notcorrespond to transactions indicated in the log to have been backed out.2. The method of claim 1, wherein the additionally recorded entries inthe replication log indicate when a transaction has been backed out. 3.The method of claim 1, wherein the additionally recorded entries in thereplication log indicate when a transaction has been committed. 4-9.(canceled)